% FWEAVE v1.30 (May 15, 1993)

\input fwebmac.sty

\Wbegin[]{article}{1em}{1em}{demo3.cts}{{\&}{\|}{\\}{\\}{\\}{\@}{\.}{\.}}

% --- Beginning of user's limbo section ---



 \WN1.  FORWARD REFERENCING.  Here is a nonsense program illustrating forward
referencing for identifiers.  Although there are various instances of
forward references, there was need for just one explicit~`\.{@[}' command
(in module~3).  Identifiers that are used in the same section as they are
defined are subscripted with a bullet.  Note how the module-number
subscripts are set in different type for different kinds of identifiers.

Here we see that one can refer to the macros~\WCD{ \|D\WIN3{2}} and~\WCD{ \|W%
\WIN2{2}} as well as the
user-defined type~\WCD{ \&{PTR}\WIN5{4}} in advance of their definition, yet
they will
be subscripted properly.
\WY\WP \&{int} \1\\{main}\WIN1{0}${}(\,)$\2\1\6
${}\{$\6
\WX4:Typedefs\X \X\6
\WX3:Special stuff\X \X\7
${}\|x=\\{fcn}\WIN1{2}(\|D\WIN3{2}(\\{outer\_test}));$\6
${}\\{py}=\|g\WIN0{3}(\|W\WIN2{2}(\\{WEB\_test}));$\6
${}\}$\2\WY\par
\fi % End of module 1

\WM2. Examples of definitions of an outer macro, a \WEB\ macro, and a function.
\WY\WP\Wd::$\|D\WIN3{0}(\\{name}) $\5
\#\\{name}\par
\WP\WMd$\|W\WIN2{0}(\\{arg}) $\5
${\ast}\\{arg}\PP{}$\par
\WY\WP \&{int} \1\\{fcn}\WIN1{0}(\&{char} ${}\ast\\{name})$\2\1\6
${}\{\,\}$\2\WY\par
\fi % End of module 2

\WM3. In the following, we had to say ``\.{PTR\ @[g\dots}'' in order to make
forward referencing to~\WCD{ \|g\WIN0{0}} work.  Although one can say things
like
``\.{@[int\ g\dots}'', it wouldn't work here to say ``\.{@[PTR\ g\dots}''
because \WCD{ \&{PTR}\WIN5{4}}~isn't known yet as a special type, even in
phase~1.
\WY\WP\4\4\WX3:Special stuff\X \X${}\WS{}$\7
\&{PTR}\WIN5{4} \1\|g\WIN1{0}(\&{int} \|i)\2\1\6
${}\{\,\}$\2\WY\par
\WU section~1.\fi % End of module 3

\WM4. The compiler will see this \WCD{ \&{typedef}} before any statements that
use the
type \WCD{ \&{PTR}\WIN5{0}}.
\WY\WP\4\4\WX4:Typedefs\X \X${}\WS{}$\7
\&{typedef} \&{char} \1${}\ast\&{PTR}\WIN5{0};$\2\WY\par
\WU section~1.\fi % End of module 4

\WN5.  INDEX.
\fi % End of module 5

\input demo3.ndx
\input demo3.mds

\Winfo{"fweave ./demo3 -zdemos.sty -=demo3.tex"}  {"./demo3.web"} {(none)}
 {C}

\Wcon
